package org.eiahe.hr.attendance.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import lombok.Data;
import org.eiahe.hr.attendance.converter.AttendanceStatusConverter;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 员工考勤汇总视图对象
 *
 * @author zhangnn
 */
@Data
@ExcelIgnoreUnannotated
public class EmployeeAttendanceSummaryVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 工号
     */
    @ExcelProperty(value = "工号")
    private String employeeNo;

    /**
     * 员工姓名
     */
    @ExcelProperty(value = "员工姓名")
    private String employeeName;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 统计年份
     */
    @ExcelProperty(value = "统计年份")
    private Integer year;

    /**
     * 统计月份(年度汇总时为0)
     */
    @ExcelProperty(value = "统计月份")
    private Integer month;

    /**
     * 应出勤天数
     */
    @ExcelProperty(value = "应出勤天数")
    private Integer workDays;

    /**
     * 实际出勤天数
     */
    @ExcelProperty(value = "实际出勤天数")
    private Integer actualDays;

    /**
     * 迟到次数
     */
    @ExcelProperty(value = "迟到次数")
    private Integer lateCount;

    /**
     * 早退次数
     */
    @ExcelProperty(value = "早退次数")
    private Integer earlyCount;

    /**
     * 旷工次数
     */
    @ExcelProperty(value = "旷工次数")
    private Integer absenceCount;

    /**
     * 事假天数
     */
    @ExcelProperty(value = "事假天数")
    private BigDecimal personalLeaveDays;

    /**
     * 病假天数
     */
    @ExcelProperty(value = "病假天数")
    private BigDecimal sickLeaveDays;

    /**
     * 年假天数
     */
    @ExcelProperty(value = "年假天数")
    private BigDecimal annualLeaveDays;

    /**
     * 剩余年假天数
     */
    @ExcelProperty(value = "剩余年假天数")
    private BigDecimal remainingAnnualLeaveDays;

    /**
     * 调休天数
     */
    @ExcelProperty(value = "调休天数")
    private BigDecimal compensatoryLeaveDays;

    /**
     * 其他假期天数
     */
    @ExcelProperty(value = "其他假期天数")
    private BigDecimal otherLeaveDays;

    /**
     * 总加班时长(分钟)
     */
    @ExcelProperty(value = "总加班时长(分钟)")
    private Integer totalOvertimeMinutes;

    /**
     * 总加班时长(小时)
     */
    @ExcelProperty(value = "总加班时长(小时)")
    private Double totalOvertimeHours;

    /**
     * 工作日加班时长(分钟)
     */
    @ExcelProperty(value = "工作日加班时长(分钟)")
    private Integer workdayOvertimeMinutes;

    /**
     * 周末加班时长(分钟)
     */
    @ExcelProperty(value = "周末加班时长(分钟)")
    private Integer weekendOvertimeMinutes;

    /**
     * 节假日加班时长(分钟)
     */
    @ExcelProperty(value = "节假日加班时长(分钟)")
    private Integer holidayOvertimeMinutes;

    /**
     * 加班次数
     */
    @ExcelProperty(value = "加班次数")
    private Integer overtimeCount;

    /**
     * 考勤异常状态(0正常 1异常)
     */
    @ExcelProperty(value = "考勤异常状态", converter = AttendanceStatusConverter.class)
    private String attendanceStatus;

    /**
     * 异常原因
     */
    @ExcelProperty(value = "异常原因")
    private String exceptionReason;

}
